﻿namespace Glorysoft.EAP.Core.Enums
{
    /// <summary>
    /// 箭头方向
    /// </summary>
    public enum ArrowDirection
    {
        Right,
        Left,
        Up,
        Down,
    }
    /// <summary>
    /// 设备事件集
    /// </summary>
    public enum EqpEvent
    {
        PodPlace,
        CarrierClamped,
        CarrierIDEvent,
        CarrierIDFailed,
        SlotMap,
        SlotMapVerified,
        PPSelected,
        LotNoSeted,
        WaferSelected,
        LoadCompleted,
        ProcessJobQueued,
        ProcessStarted,
        ProcessEnd,
        UnloadReturn,
        UnloadCompleted,
        PodRemoved,
        ProcessWithCarrier1stReturn,
        ProcessWithCarrier2ndReturn,
        CreatePjReturn,
        CreateCjReturn,
        CancelCarrierReturn,
        PRJobDequeueReturn,
        CJStopReturn,
        LoadReturn,
        StartReturn,
        RecipeCompare,
        AlarmReported,
        PJCJSpaceError,
        RMSPPIDListReply,
        RMSPPIDUploadReply,
        RMSRunTimeUpload,
        ParamDataReport,
        ProcessStop,
    }
    /// <summary>
    /// 错误语言版本
    /// </summary>
    public enum ErrorLanguage
    {
        ENG,
        CHS
    }
    /// <summary>
    /// Wafer状态
    /// </summary>
    public enum WaferState
    {
        Waiting,
        LoadingDone,
        UnloadingDone,
        Testing,
        Stop,
        Tested,
    }
    /// <summary>
    /// Hold状态
    /// </summary>
    public enum HoldState
    {
        True = 0,
        False
    }
    /// <summary>
    /// 设备状态
    /// </summary>
    public enum EQPState
    {
        INIT = 0,
        RUN = 1,
        IDLE = 2,
        DOWN = 3,
        PM = 4,
        COMPLETED = 5,
        SUSPEND,
        UP,
        ENGINERRING,
        SETUP,
        READY,
        EXECUTE,
        ALARM,
        PAUSE,
        ERUN
    }
    public enum EQPStateASM83X
    {
        Productive = 1,
        Standby = 2,
        Engineering = 3,
        ScheduleDown = 4,
        UnscheduleDown = 5,
        NonScheduleDown = 6
    }
    /// <summary>
    /// Lot状态
    /// </summary>
    //public enum ProcessState
    //{
    //    UNKNOWN = 0,
    //    PROCESSINGNOTACTIVE = 1,
    //    RUNNING = 2,
    //    ASSIST = 3,
    //    PAUSED = 4,
    //    WAITING = 5,
    //    COMPLETED = 6,
    //    ABORT = 7,
    //    CARRIERLOADED = 8,
    //    ALARM = 9,
    //    MOVEOUT = 10,
    //    PPSELECTED = 11,
    //    MOVEIN = 12,
    //    LOTSPC_ALARM = 13,
    //    CHECK_RECIPE = 14,
    //    CHECK_PARAMETER = 15,
    //    RMS_COMPARE = 16,
    //    LOAD_CMD = 17,
    //    START_CMD = 18,
    //    COLLECT_PARAMETER = 19,
    //    PROCESS_END = 20,
    //    IDLE = 24,
    //    PPSELECT_FAIL = 25,
    //    LOADCMD_FAIL = 26,
    //    STARTCMD_FAIL = 27,
    //    RMS_FAIL = 28,
    //    PPIDLIST_FAIL = 29,
    //    PARAMETER_FAIL = 30,
    //    LOAD_ERROR = 31,
    //    PROCESSSTART_ERROR = 32,
    //    PROCESSEND_ERROR = 33,
    //    LOAD_Receive = 34,
    //    START_Receive = 35,
    //    WARNNING = 36,
    //    PPSELECT_Receive = 40,
    //    Lot_Hold = 41,
    //    Down_Tool = 42,
    //    Mail_AlarmSend = 43,
    //    MOVEIN_Fail = 46,
    //    MOVEOUT_Fail = 47,
    //    UNLOAD_CMD = 48,
    //    UNLOAD_Receive = 49,
    //    UNLOAD_FAIL = 50,
    //    LOT_MAP = 51,
    //    LOT_MAPAlarm = 52,
    //    InQ_time = 53,
    //    InQ_time_Fail = 54,
    //    CheckChemical = 55,
    //    CheckChemical_Fail = 56,
    //    CheckWaferCount = 57,
    //    CheckWaferCount_Fail = 58,
    //    Changing2_UP = 59,
    //    Changed2_UP_OK = 60,
    //    Changed2_UP_Fail = 61,
    //    Changing2_Idle = 62,
    //    Changed2_Idle_OK = 63,
    //    Changed2_Idle_Fail = 64,
    //    CheckChamberStatus_OK = 65,
    //    CheckChamberStatus = 66,
    //    CheckChamberStatus_Overtime = 67,
    //    CheckChamberStatus_Fail = 68,
    //    LOT_SPC = 69,
    //    EQP_SPC = 70,
    //    EQPSPC_ALARM = 71
    //}

    /// <summary>
    /// Lot状态
    /// </summary>
    public enum ProcessState
    {
        UnKnow,
        Running,
        Waitting,
        Completed,
        GetLotInfoOK,
        GetLotInfoFail,
        Abort,
        CarrierLoaded,
        Alarm,
        TrackOut,
        PPSelectCmd,
        TrackIn,
        CheckingRecipe,
        RequestRmsCompare,
        RmsCompared,
        LoadCmd,
        StartCmd,
        ProcessEnd,
        Idle,
        PPSelect_Fail,
        LoadCmd_Fail,
        StartCmd_Fail,
        RmsCompared_Fail,
        PPIDList_Fail,
        MaskList_Fail,
        PPIDListOK,
        LoadCmd_Error,
        StartCmd_Error,
        ProcessEnd_Error,
        LoadCmdReceive,
        StartCmdReceive,
        Warning,
        UnLoadCmd,
        UnLoadCmdReceive,
        UnLoadCmd_Fail,
        PPSelectCmdReceive,
        TrackIn_Fail,
        TrackOut_Fail,
        PLT_VALIDATION_Fail,
        LOT_VALIDATION_Fail,
        ProceedCarrier1stCmd,
        ProceedCarrier1stCmd_Fail,
        ProceedCarrier1stCmdReceive,
        ProceedCarrier2ndCmd,
        ProceedCarrier2ndCmd_Fail,
        ProceedCarrier2ndCmdReceive,
        CheckProcessJobSpace,
        CheckProcessJobSpace_Fail,
        CreateProcessJobCmd,
        CreateProcessJobCmd_Fail,
        CreateProcessJobCmdReceive,
        CheckControlobSpace,
        CheckControlJobSpace_Fail,
        CreateControlJobCmd,
        CreateControlJobCmd_Fail,
        CreateControlJobCmdReceive,
        CreateControlJob_Error,
        CreateProcessJob_Error,
        CheckWaferQty_Fail,
        CheckWaferQtyOK,
        RFID_Fail,
        RFID_OK,
        ScanCmd,
        ScanCmdReceive,
        ScanCmd_Fail,
        Scan_Error,
        ScanReport,
        GoRemoteCmd,
        GoRemoteCmdOK,
        GoRemoteCmd_Fail,
        PodPlaced,
        PodPlaced_Fail,
        PodRemoved,
        PodRemoved_Fail,
        CarrierClamped,
        CarrierClamped_Fail,
        CarrierUnclamped,
        CarrierUnclamped_Fail,
    }
    /// <summary>
    /// 设备控制状态
    /// </summary>
    public enum ControlState
    {
        UNKNOWN = 0,
        EQPOFFLINE = 1,
        OFFLINEATTEMPTINGTOONLINE = 2,
        HOSTOFFLINE = 3,
        LOCAL = 4,
        REMOTE = 5,
        EQPONLINE = 6,
        EAPONLINE = 7
    }
    /// <summary>
    /// 消息类型
    /// </summary>
    public enum MsgType
    {
        Nomal,
        Warn,
        Error,
        Alarm,
        ParamValue
    }
    /// <summary>
    /// 消息标识
    /// </summary>
    public enum MessageOrigin
    {
        EQP,
        EAP,
        MES,
        OP,
        OCR,
        Daemon,
        RCM,
        OCR_Tester,
        ODYSSEY,
    }
    /// <summary>
    /// 物料类型
    /// </summary>

    /// <summary>
    /// 进程Lot状态
    /// </summary>
    public enum JLStatus
    {
        Initialized = 0,
        Arrived = 1,
        CarrierClamped = 2,
        CarrierIdRead = 3,
        Created = 4,
        RqstToCheckRecipe = 5,
        RecipeCompared = 6,
        RqstToRmsCheck = 7,
        RmsChecked = 8,
        RecipeTuned = 9,
        RqstToCancelCarrier = 10,
        CarrierCanceled = 11,
        RqstToDelete = 12,
        Deleted = 13,
        RqstToDownload = 14,
        Downloaded = 15,
        ProcessWithCarrier1st = 16,
        Slotmap = 17,
        ProcessWithCarrier2nd = 18,
        SlotMapVerified = 19,
        Loading = 20,
        RqstToLoad = 21,
        Loaded = 22,
        TrackInSent = 23,
        TrackInOk = 24,
        StartCmdSent = 25,
        StartCmdSentOk = 26,
        ProcessStarted = 27,
        WaferIn = 28,
        WaferOut = 29,
        ProcessEnded = 30,
        Unloading = 31,
        RqstToUnload = 32,
        Unloaded = 33,
        TrackOutSent = 34,
        TrackOutOk = 35,
        Removed = 36,
        Aborted = 100,
        CreateFailed = 101,
        CheckRecipeFailed = 102,
        JobStartWitoutTune = 103,
        SlotMapVerifiedFailed = 104,
        NoEnoughSpace = 105,
        RqstToLoadFailed = 106,
        RqstToStartFailed = 107,
        RqstToUnloadFailed = 108,
        RqstToPPSelect = 202,
        TrackInCancelSent = 109,
        TrackInCanceled = 110,
        LotHoldSent = 111,
        LotHoldOk = 112,
        TrackInFailed = 113,
        TrackOutFailed = 114,
        TrackInCancelFailed = 115,
        LotHoldFailed = 116,
        GetParameter = 200,
        CollectParameter = 201,
        StartError = 301,
        ENDError = 302,
        UnloadError = 303,
        DownToolOk = 304,
        QueryCjobSpace = 305,
        QueryPjobSpace = 306
    }
    public enum MaCoType
    {
        Time = 0,//时间
        Count = 1,//次数
        Points = 2,//点数
        HubBlade = 3,//硬刀
        HublessBlade = 4,//软刀
        SingleUse = 5,//一次性使用 
        ControlNo//物料管控没有维护,请联系工程师维护!
    }

    #region KNS ENUM
    public enum KNSCommState
    {
        UNKNOWN = 0,
        DISABLED = 1,
        ENABLED = 2,
        WAITINGFORCR = 3,
        WAITINGFORTX = 4,
        WAITINGFORHOST = 5,
        WAITDELAY = 6,
        COMMUNICATING = 7
    }

    public enum KNSControlState
    {
        UNKNOWN = 0,
        EQUIPMENTOFFLINE = 1,
        ATTEMPTINGTOGOONLINE = 2,
        HOSTOFFLINE = 3,
        ONLINELOCAL = 4,
        ONLINEREMOTE = 5
    }

    public enum KNSProcessState
    {
        UNKNOWN = 0,
        PROCESSINGNOTACTIVE = 1,
        AUTORUN = 2,
        ASSIST = 3,
        PAUSED = 4,
        WAITING = 5
    }

    public enum KNSEvent
    {
        ControlStateToOnlineLocal = 8001,
        ControlStateToOnlineRemote = 8002,
        ControlStateToOffline = 8003,
        ProcessStateChange = 8004,
        ProcessMonitoringDataReady = 8013,
        MHS_CARRIER_EJECTED = 8034,
        PPDownload = 8100,
        PPUpload = 8101,
        PPModified = 8105,
        BondParameterChanged = 8107,
        BondLocationChanged = 8108,
        PARM_LIMITS_EDITED = 8109,
    }
    #endregion

    #region ASM ENUM AD8321i
    public enum ASMCommState
    {
        IDLE = 0,
        PRODUCTIVE = 1,
        STANDBY = 2,
        ENGINEERING = 3,
        SCHEDULEDOWN = 4,
        UNSCHEDULEDOWN = 5,
        NONSCHEDULEDOWN = 6
    }

    public enum ASMControlState
    {
        UNKNOWN = 0,
        EQUIPMENTOFFLINE = 1,
        ATTEMPTINGTOGOONLINE = 2,
        HOSTOFFLINE = 3,
        ONLINELOCAL = 4,
        ONLINEREMOTE = 5
    }

    public enum ASMProcessState
    {
        UNKNOWN = 0,
        PROCESSINGNOTACTIVE = 1,
        AUTORUN = 2,
        ASSIST = 3,
        PAUSED = 4,
        WAITING = 5
    }

    public enum ASMEvent
    {
        ControlStateToOnlineLocal = 8001,
        ControlStateToOnlineRemote = 8002,
        ControlStateToOffline = 8003,
        ProcessStateChange = 8004,
        ProcessMonitoringDataReady = 8013,
        MHS_CARRIER_EJECTED = 8034,
        PPDownload = 8100,
        PPUpload = 8101,
        PPModified = 8105,
        BondParameterChanged = 8107,
        BondLocationChanged = 8108,
        PARM_LIMITS_EDITED = 8109,
        StatuCEID = 47
    }
    #endregion

    #region ASM ENUM iHawk AERO
    public enum ASMAeroCommState
    {
        PRODUCTIVE = 1,
        STANDBY = 2,
        ENGINEERING = 3,
        SCHEDDOWN = 4,
        UNSHDOWN = 5,
        NONSCHDOWN = 6
    }

    public enum ASMAeroControlState
    {
        UNKNOWN = 0,
        EQUIPMENTOFFLINE = 1,
        ATTEMPTINGTOGOONLINE = 2,
        HOSTOFFLINE = 3,
        ONLINELOCAL = 4,
        ONLINEREMOTE = 5
    }

    public enum ASMAeroProcessState
    {
        UNKNOWN = 0,
        PROCESSINGNOTACTIVE = 1,
        AUTORUN = 2,
        ASSIST = 3,
        PAUSED = 4,
        WAITING = 5
    }

    public enum ASMAeroEvent
    {
        ControlStateToOnlineLocal = 8001,
        ControlStateToOnlineRemote = 8002,
        ControlStateToOffline = 8003,
        ProcessStateChange = 8004,
        ProcessMonitoringDataReady = 8013,
        MHS_CARRIER_EJECTED = 8034,
        PPDownload = 8100,
        PPUpload = 8101,
        PPModified = 8105,
        BondParameterChanged = 8107,
        BondLocationChanged = 8108,
        PARM_LIMITS_EDITED = 8109,
        StatuCEID = 22
    }

    #endregion

    public enum DaemonCommState
    {

    }

    /// <summary>
    /// 报警代码
    /// </summary>
    public enum AlarmCode : byte
    {
        /// <summary>
        /// 清除
        /// </summary>
        Clear = 0x00,
        /// <summary>
        /// 上报
        /// </summary>
        Set = 0x01,
    }
}
